package com.helmlabs.grouper.accounts;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AccountApplicationContext {
	
	private static AccountApplicationContext instance;
	private static ApplicationContext context;

	private AccountApplicationContext(ApplicationContext context){
		this.context = context;
	}
	
	public static AccountApplicationContext getInstance(){
		if (instance==null){
			instance = new AccountApplicationContext(new ClassPathXmlApplicationContext("applicationContext-accounts.xml"));
		}
		
		return instance;
	}
	
	public Object getBean(String name){
		return context.getBean(name);
	}

	
}
